home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / wireProperties.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  5.8 KB  |  166 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  April 12 1996
  22. //  Author:         sspence
  23. //
  24. //  Description:
  25. //
  26. //  Input Arguments:
  27. //      None.
  28. //
  29. //  Return Value:
  30. //      None.
  31. //
  32.  
  33.  
  34. proc wireSetCallbacks (string $parent) {
  35. //
  36. //  Description:
  37. //        Set the callbacks for all of the controls in the dialog.
  38. //        Modifying the context will force wireValues() to be called
  39. //        to update the state of the property sheet.
  40. //
  41. //
  42.     setParent $parent;
  43.  
  44.        checkBoxGrp -e
  45.         -cc "wireContext -e -ho #1 `currentCtx`" holderBox;
  46.     floatSliderGrp -e
  47.         -cc "wireContext -e -en #1 `currentCtx`" envelopeSlider;
  48.     floatSliderGrp -e
  49.         -cc "wireContext -e -ce #1 `currentCtx`" conSlider;
  50.     floatSliderGrp -e
  51.         -cc "wireContext -e -li #1 `currentCtx`" locSlider;    
  52.     floatSliderGrp -e
  53.         -cc "wireContext -e -dds #1 `currentCtx`" ddSlider;
  54.        checkBoxGrp -e
  55.         -cc "wireContext -e -gw #1 `currentCtx`" groupWireBox;
  56.  
  57.     optionMenuGrp -e -cc "wireContext -e -do #1 `currentCtx`" 
  58.         wirePositioningWidget;
  59.  
  60.  
  61.     checkBoxGrp -e   -cc "wireContext -e -exc #1 `currentCtx`;optionMenuGrp -e -enable #1 partitionListWidget;textFieldGrp -e -enable #1 partitionNameWidget" exclWidget;
  62.     textFieldGrp -e -cc "wireContext -e -ep #1 `currentCtx`" 
  63.         partitionNameWidget;
  64. }
  65.  
  66.  
  67. global proc wireProperties ( ) {
  68. //
  69. //  Description:
  70. //        This procedure builds the property sheet and assigns callbacks to
  71. //        its controls.  The state of the controls are set in wireValues().
  72. //
  73. //
  74.  
  75.     setUITemplate -pushTemplate OptionsTemplate;
  76.  
  77.     string $parent = `toolPropertyWindow -q -location`;
  78.     setParent $parent;
  79.  
  80.      columnLayout wire;
  81.         frameLayout -bv true -collapsable true -collapse false
  82.             -l "Wire Settings"  preserveEditFrame_tab;
  83.             columnLayout ;
  84.  
  85.                 checkBoxGrp -ncb 1 
  86.                     -annotation "Holders are curves that you can use to limit the wire's deformation region."
  87.                     -l1 "Holders" holderBox;
  88.                 floatSliderGrp -field true -max 1.0
  89.                     -annotation "The envelope is a scale on the deformation."
  90.                     -l "Envelope"
  91.                     envelopeSlider;    
  92.                    floatSliderGrp -field true  -max 1.0
  93.                     -annotation "The crossing effect specifies the amplitude of the deformation in areas where two wires cross."
  94.                     -l  "Crossing Effect"
  95.                     conSlider;
  96.                 floatSliderGrp -field true  -max 1.0
  97.                     -annotation "The local influence specifies the localization of the deformation effect of two or more wires."                    
  98.                     -l  "Local Influence"
  99.                        locSlider;
  100.                 floatSliderGrp -field true  -max 10.0
  101.                     -annotation "The dropoff distance specifies the region of influence of the wire."
  102.                     -l  "Dropoff Distance"
  103.                     ddSlider;
  104.                 checkBoxGrp -ncb 1
  105.                     -annotation "The grouping option groups the wire with the base wire so that they can easily be moved together to create a ripple effect."
  106.                     -l "Grouping"
  107.                     -l1 "Group Wire(s) and Base Wire(s)" groupWireBox;
  108.             separator;            
  109.             // Positioning of the wire deformer in the DG
  110.             optionMenuGrp -annotation "The deformation order is used to control how the wire is added to the history of the shape." -label "Deformation Order" wirePositioningWidget;
  111.                 menuItem -label "Default"       wirePosItem1;
  112.                 menuItem -label "Before"        wirePosItem2;
  113.                 menuItem -label "After"         wirePosItem3;
  114.                 menuItem -label "Split"         wirePosItem4;
  115.                 menuItem -label "Parallel"      wirePosItem5;
  116.                 
  117.             separator;
  118.  
  119.             // exclusive deformation UI
  120.  
  121.             checkBoxGrp    
  122.             -numberOfCheckBoxes 1
  123.             -label ""
  124.                 -annotation "The exclusive option is used to put the wire in a partition so its membership will not overlap with other deformers in the partition."
  125.             -label1 "Exclusive"
  126.             -v1 0 
  127.                 //        -on1 "optionMenuGrp -e -enable 1 partitionListWidget;textFieldGrp -e -enable 1 partitionNameWidget"
  128.                 //    -offCommand "optionMenuGrp -e -enable 0 partitionListWidget;textFieldGrp -e -enable 0 partitionNameWidget"
  129.                exclWidget;
  130.  
  131.              textFieldGrp -l "Exclusive Partition" -enable `checkBoxGrp -q -v1 exclWidget` -tx "deformPartition"
  132.         partitionNameWidget;
  133.  
  134.              // Create an option menu listing the partitions
  135.             //
  136.         optionMenuGrp -l "Existing Partitions" -enable `checkBoxGrp -q -v1 exclWidget`
  137.          -cc "textFieldGrp -e -tx `optionMenuGrp -q -v partitionListWidget` partitionNameWidget" partitionListWidget;
  138.  
  139.          // add all the partitions to the menu
  140.         //
  141.         int $pp;
  142.          string $partitionArray[];
  143.         $partitionArray = `ls -type partition`;
  144.         int $partitionCount = size($partitionArray);
  145.         for ($pp = 0; $pp < $partitionCount; $pp++)
  146.         {
  147.             // Do not list the render partition as adding items to
  148.             // it is only going to cause confusion.
  149.             //
  150.             if ($partitionArray[$pp] != "renderPartition") {
  151.                 menuItem -l $partitionArray[$pp];
  152.             }
  153.         }
  154.  
  155.  
  156.  
  157.             setParent ..;
  158.         setParent ..;
  159.     setParent ..;
  160.  
  161.     wireSetCallbacks ($parent);
  162.  
  163.     setUITemplate -popTemplate;
  164. }
  165.  
  166.